package com.tigercel.xiangchengyun.adapter

import android.view.View
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.tigercel.xiangchengyun.R
import com.tigercel.xiangchengyun.entity.ServiceEntity
import com.tigercel.xiangchengyun.utils.Global


/**
 * Created by wqj on 2018/5/31.
 */
class ServicesRecyclerViewAdapter(layoutResId: Int, data: List<ServiceEntity>?) : BaseQuickAdapter<ServiceEntity, BaseViewHolder>(layoutResId, data) {

    override fun convert(helper: BaseViewHolder, item: ServiceEntity) {
        helper.setText(R.id.services_title, item.service_name).setText(R.id.setvices_subTitle, item.desc)

        Glide.with(mContext).load(Global.ImgBaseUrl + item.icon).into(helper.getView<View>(R.id.services_image) as ImageView)
    }
}
